/*
   定义狗类
 */
public class Work042 {
    private char color;
    private String breed;
    //建立空参

    public Work042() {
    }
    //建立无参

    public Work042(char color, String breed) {
        this.color = color;
        this.breed = breed;
    }
    //建立有参

    public char getColor() {
        return color;
    }

    public void setColor(char color) {
        this.color = color;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }
    //建立方法
    public void eat(){
        System.out.println(color+"色的"+breed+"正在啃骨头...");
    }
    public void lookHome(){
        System.out.println(color+"色的"+breed+"正在看家...");
    }
}
